package PTA3.ti37;

import java.util.Scanner;

/**
 * @author Lenovo
 */
class BankAccount{
    private int balance;
    public BankAccount(){
        this.balance=0;
    }
    public  BankAccount(int balance){
        this.balance=balance;
    }

    public int getBalance() {
        return balance;
    }
    public void withdraw(int amount){
        balance-=amount;
    }
    public void deposit(int amount){
        balance+=amount;
    }
}
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int initialBalance = scanner.nextInt();
        int withdrawAmount = scanner.nextInt();
        int depositAmount = scanner.nextInt();
        BankAccount bankAccount = new BankAccount(initialBalance);
        System.out.println("初始余额：" + bankAccount.getBalance());
        bankAccount.withdraw(withdrawAmount);
        System.out.println("取款后余额：" + bankAccount.getBalance());
        bankAccount.deposit(depositAmount);
        System.out.println("存款后余额：" + bankAccount.getBalance());
        scanner.close();
    }
}
